package javase.chixing.thread_synchronized;

class ThreadC extends Thread{
    @Override
    public void run() {
        synchronized (ThreadMainDemo.obj) {
            System.out.println("C线程正在初始化...");
            try {
                //进入等待 wait 状态
                System.out.println("C线程准备进入等待状态...");
                ThreadMainDemo.obj.wait();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("C线程执行结束...");
        }
    }
}
